"use strict";
var gulp = require("gulp");
var webpack = require("webpack");
var config = require("../webpack.config.js");

/**
 * Call webpack.
 *
 * @method webpack
 */
module.exports = function (done) {
  var plugins = this.opts.plugins;
   webpack(config, function(err, stats) {
    if (err) throw new plugins.util.PluginError("webpack", err);
    plugins.util.log("webpack", stats.toString());
    done();
  });
};
